# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1120 -> 1.1121 # include/linux/sched.h 1.144 -> 1.145 # drivers/char/mem.c 1.40 -> 1.41 # kernel/sched.c 1.180 -> 1.181 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/06/05 davidm@tiger.hpl.hp.com 1.1121 # More small cleanups to /dev/mem driver and for stack dumping. # -------------------------------------------- # diff -Nru a/drivers/char/mem.c b/drivers/char/mem.c --- a/drivers/char/mem.c Sun Jun 8 00:40:32 2003 +++ b/drivers/char/mem.c Sun Jun 8 00:40:32 2003 @@ -105,8 +105,8 @@ } -static ssize_t do_write_io(struct file * file, void *p, unsigned long realp, - const char * buf, size_t count, loff_t *ppos) +static ssize_t do_write_mmio(struct file * file, void *p, unsigned long realp, + const char * buf, size_t count, loff_t *ppos) { ssize_t written; char byte; @@ -209,7 +209,7 @@ if (uncached_access(file, (unsigned long) p)) { if (!(addr = ioremap(p, count))) return -EFAULT; - ret = do_write_io(file, addr, p, buf, count, ppos); + ret = do_write_mmio(file, addr, p, buf, count, ppos); iounmap(addr); } else ret = do_write_mem(file, __va(p), p, buf, count, ppos); diff -Nru a/include/linux/sched.h b/include/linux/sched.h --- a/include/linux/sched.h Sun Jun 8 00:40:32 2003 +++ b/include/linux/sched.h Sun Jun 8 00:40:32 2003 @@ -148,9 +148,14 @@ extern void init_idle(task_t *idle, int cpu); extern void show_state(void); -extern void show_trace(struct task_struct *, unsigned long *); -extern void show_stack(struct task_struct *, unsigned long *); extern void show_regs(struct pt_regs *); + +/* + * TASK is a pointer to the task whose backtrace we want to see (or NULL for current + * task), SP is the stack pointer of the first frame that should be shown in the back + * trace (or NULL if the entire call-chain of the task should be shown). + */ +extern void show_stack(struct task_struct *task, unsigned long *sp); void io_schedule(void); long io_schedule_timeout(long timeout); diff -Nru a/kernel/sched.c b/kernel/sched.c --- a/kernel/sched.c Sun Jun 8 00:40:32 2003 +++ b/kernel/sched.c Sun Jun 8 00:40:32 2003 @@ -2203,10 +2203,7 @@ else printk(" (NOTLB)\n"); - { - extern void show_trace_task(task_t *tsk); - show_trace_task(p); - } + show_stack(p, NULL); } void show_state(void)